import { InlineInfoItems } from '@/components/InlineInfoItems';
import { Alert, theme } from 'antd';
import { ShowLog } from '../Log/Log';

const { useToken } = theme;
export function OrderInfoAlert({
  orderName,
  orderCode,
}: {
  orderName: string;
  orderCode: string;
}) {
  const { token } = useToken();
  const margin = token.marginXS;

  return (
    <Alert
      style={{ marginBottom: margin }}
      message={
        <>
          <InlineInfoItems
            items={[
              { key: '订单编号', value: orderCode },
              { key: '订单名称', value: orderName },
            ]}
          />
          <ShowLog />
        </>
      }
      type="info"
      showIcon
    />
  );
}
